// iframe实现双向通信

const express = require('express')
const app = express()
app.listen(3000, '0.0.0.0')
app.use(express.static('www'))

app.get('/ajax', (req, res) => {
  res.send(`
    <script>
    parent.document.querySelector('#root').innerHTML = Date.now()
    </script>
  `)
  /* let timer = setInterval(() => {
    clearInterval(timer)
    res.send('aaaa')
  }, 5000); */


})

